﻿package com.cenfun.ui {
	import fl.controls.*;
	import fl.controls.listClasses.*;
	import fl.core.*;
	import fl.data.*;
	import fl.events.*;
	import flash.display.*;
	import flash.events.*;
	import flash.ui.*;
	public final class TR extends List {
		//子节点缩进距离
		public static var indent:Number = 20;
		//
		private var td:TD;
		public function TR():void {
			super();
			setStyle('cellRenderer', TC);
		}
		public function init():void {
			td.init();
		}
		public function find(keyword:String):void {
			td.find(keyword);
		}
		override public function set dataProvider(dp:DataProvider):void {
			super.dataProvider = dp
			td = dp as TD;
		}
		override protected function keyDownHandler(e:KeyboardEvent):void {
			super.keyDownHandler(e);
			switch (e.keyCode) {
				case Keyboard.LEFT :
				case Keyboard.RIGHT :
				case Keyboard.SPACE :
				case Keyboard.ENTER :
					if (caretIndex == -1) {
						caretIndex = 0;
					}
					var renderer:TC = e.currentTarget as TC;
					var node:TN = selectedItem as TN;
					node.toggle();
					e.stopPropagation();
					break;
				default :
			}
		}
		

		


	}
}